<?php
error_reporting(E_ALL & ~E_NOTICE);
include_once("conn.php");

$webpath=str_replace('\\','/',dirname(__FILE__));
$_ENV['webpath']=$webpath."/";

include_once("model/smarty.inc.php");
$result=mysql_query("select * from ".$prefix."websetting");
if($arr=mysql_fetch_array($result)){
	$userpid = $arr['PID'];     
	$usernick = $arr['usernick'];
	
	$website=$arr['website'];					//网站域名
	$webname=$arr['webname'];							//网站名称,最好不要超过6个字
	$postfix=$arr['postfix'];					//网站名称后缀，网站的整个名称即为$webname & $postfix
	$keywords=$arr['keywords'];										//网站关键字
	$description=$arr['description'];									//网站描述
	$apierr_msg=$arr['apierr_msg'];
	$start_commissionRate=$arr['start_commissionRate'];
	$end_commissionRate=5000;
	
	
	$ICP=$arr['ICP'];											//网站备案号
	$tongji=$arr['tongji']; 									//网站统计代码
	$QQ=$arr['QQ'];												//站长QQ
	$search_key_num=$arr['w_keynum'];	                        //搜索关键字个数
	$newshopnum=$arr['newshopnum'];                             //最新推荐店铺个数
	$jiathis=$arr['jiathis'];                             
	
	$liebiao_remai=$arr['liebiao_remai'];
	$liebiao_shoushen=$arr['liebiao_shoushen'];
	$liebiao_fengxiong=$arr['liebiao_fengxiong'];
	$liebiao_search=$arr['liebiao_search'];
	$liebiao_miaosha=$arr['liebiao_miaosha'];
	
	$moban=$arr['moban'];
	$cache=$arr['cache'];
	$cachetime=$arr['cachetime'];
	$rewrite=$arr['rewrite'];
	if($rewrite==1){
		$rewrite_postfix='/';
		$lcat="c";
		$lpage="p";
		$ljoin="/";
		$lpro="product";
	}elseif($rewrite==2){
		$rewrite_postfix=$arr['rewrite_postfix'];
		$lcat="";
		$lpage="";
		$ljoin="-";
		$lpro="";
	}
	$show_topnav=$arr['show_topnav'];
}
$app = array();
$result=mysql_query("select * from ".$prefix."app");
while($arr=mysql_fetch_array($result)){
	$a=array(" ".$arr['a_appkey'] => $arr['a_appsecret']);
	$app=array_merge($app,$a);
}

$result=mysql_query("select * from ".$prefix."ad");
if($arr=mysql_fetch_array($result)){
	foreach($arr as $k => $v){
		$ads[$k]=stripslashes($v);
	}
}

$result=mysql_query("select * from ".$prefix."artset where id=1");
if($arr=mysql_fetch_array($result)){
	$art=$arr;
}

$_ENV['apierr_msg']=$apierr_msg;
$_ENV['website']=$website;
?>